export function getGraphConfig() {
  return {
    grid: {
      visible: true
    },
    interacting: false, // 节点和边的交互行为
    connecting: {
      anchor: "orth",
      connector: "rounded", // smooth  rounded  jumpover
      connectionPoint: "boundary",
      router: {
        name: "er",
        args: {
          offset: "center",
          direction: "H",
          min: 32
        }
      }
    },
    scroller: {
      enabled: true,
      pageVisible: false,
      pageBreak: false,
      pannable: true
    },
    mousewheel: {
      enabled: true,
      global: true,
      modifiers: ["ctrl", "meta"]
    }
  };
}

export function getGraphLayoutConfig() {
  return {
    type: "dagre",
    rankdir: "LR",
    align: "", // UL' | 'UR' | 'DL' | 'DR'
    ranksep: 90,
    nodesep: 40
  };
}

export function getGraphEdgeConfig(edge) {
  return {
    // router: {
    //   name: "orth",
    //   args: {
    //     zIndex: -1,
    //     padding: 30
    //   }
    // },
    // vertices: [{ x: 100 }],

    attrs: {
      line: {
        stroke: "#000",
        strokeWidth: 1
      }
    }
  };
}
